import pandas as pd


'''
根据excel的sheet名称，遍历读取内容
'''
pd.read_excel("/Users/c/存档/2021-12-01人行征信库/0101公司代码/xfeature-yh-gen2/xfeature-yh/doc/人行二代-特征字典-V1.0.0.xlsx")
xl = pd.ExcelFile("/Users/c/存档/2021-12-01人行征信库/0101公司代码/xfeature-yh-gen2/xfeature-yh/doc/人行二代-特征字典-V1.0.0.xlsx")
print(xl)
print(xl.sheet_names)  # 所有的sheet名称['index', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32']


result=[]
print(result)
for sheet_name in xl.sheet_names[1:]:
    print(sheet_name)#1
    result = result+list(xl.parse(sheet_name)['特征解释'])  # 读取Excel中sheet_name的数据
#print(result)
